/**
 * 内容组件
 * created by xq on 2018/10/16
 */
import React from 'react'
import PropType from 'prop-types'
import ThemeSwitch from './ThemeSwitch'
import { connect } from './react-redux'
class Content extends React.Component {
  static propTypes = {
    themeColor: PropType.string
  }
  render() {
    return (
      <div>
        <p
          style={{ color: this.props.themeColor }}>this is content</p>
        <ThemeSwitch />
      </div>
    )
  }
}
const mapStateToProps = state => {
  return {
    themeColor: state.themeColor
  }
}
export default connect(mapStateToProps)(Content)